﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using RealtorsPortal.Business_Logic_Layer;

namespace RealtorsPortal
{
    public partial class Renting : System.Web.UI.Page
    {
        AdvertisementsDAL advd = new AdvertisementsDAL();
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!IsPostBack){
                this.LoadAndBindData();
            }
        }

        private void LoadAndBindData()
        {
            lvwRentingAds.DataSource = advd.GetAdsByTypeDataTable("Rent");
            lvwRentingAds.DataBind();
        }
    }
}